The QTMLGetCanonicalPathName routine takes a native file path and returns the one canonical path to that file.
OSErr QTMLGetCanonicalPathName(char *inName, char *outName,
unsigned long outLen);
This routine takes a native file path and returns the one canonical path to that file.
Some of the tasks performed by this routine include:
For example, if you have a file with the following path
c:\Program Files\Some Product\test.mov
and the 8.3 path happens to be:
c:\PROGRA~1\SOMEPR~1\test.mov
you can pass any of the following paths to QTMLGetCanonicalPathName
c:\Some other folder\..\program FILES\another program\..\somepr~1\TeSt.MoV
C:\proGra~1\Some product\..\SOMEPR~1\..\..\program files\some product\test.mov
C:\PROGRA~1\SOMEPR~1\TEST.MOV
c:\Program Files\Some Product\test.mov
There is a one-to-one mapping between canonical pathnames and files. In other words, you can determine if two paths point to the same file by canonicalizing both paths, and then doing a string compare.
This routine also works for universal naming convention (UNC) paths. These paths are of the form:
\\my_server\shared_folder\another folder\test.mov
| Previous | Chapter Contents | Chapter Top | Next |